Inter-Integrated Circuit (I2C) is a multi-master, serial, single-ended computer bus used for attaching low-speed peripherals to a motherboard, embedded system, mobile device or other electronic device. I2C uses two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock (SCL), pulled up with resistors. Nodes on the bus can have a master or slave role. I2C defines three basic types of messages, each of which begins with START and ends with STOP. These messages include: 1) single message where a master writes data to a slave; 2) single message where a master reads data from a slave; and 3) combined messages, where a master issues at least two reads and/or writes to one or more slaves.
FIG. 1 is a timing diagram illustrating START/STOP conditions for an I2C bus. A START condition S is denoted by a high to low transition on SDA while SCL is high, and the STOP condition P is denoted by a low to high transition on SDA while SCL is high.
A slave device or a master device in a multi-master system coupled to an I2C bus requires a START/STOP detector to detect the START/STOP conditions on SDA and SCL. One commonly used method is to synchronize SDA and SCL to a system clock, and use synchronous logic for START and STOP detection. The drawback of this method is that it requires a running system clock that is faster than the SCL frequency.